/**
 * Created by xiaotao on 18-5-2.
 */
import request from '@/utils/request'

export function profileInfo() {
  return request({
    url: '/manage/profile',
    method: 'get'
  })
}

// 上传文件
export function changeAvatar(file) {
  return request({
    url: '/manage/profile/avatar'
  })
}

export function changePassword(data) {
  return request({
    url: '/manage/profile/password',
    method: 'post',
    data
  })
}

export function profileUpdate(data) {
  return request({
    url: '/manage/apply/update',
    method: 'put',
    data
  })
}

export function profileModify(field, value) {
  return request({
    url: '/manage/profile/modify',
    method: 'patch',
    data: { field, value }
  })
}
